package com.yangfan.cloudalibaba.service;

import com.yangfan.springcloud.entities.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@Component
@FeignClient(value = "seata-account")
public interface AccountService {

    @PostMapping(value = "/account/decreaseAccount")
    CommonResult decreaseAccount(@RequestParam(value = "userId") Long userId, @RequestParam(value = "money") BigDecimal money);

}
